import request from '@/utils/request';

// 查询角色列表
export function listRole(query: any) {
    return request({
        url: '/tienchin/activity/list',
        method: 'get',
        params: query,
    });
}

// 根据活动id(可多个)删除活动
export function deleteId(activityIds: any,) {
    return request({
        url: '/tienchin/activity/' + activityIds,
        method: 'delete',
    });
}

// 查询渠道名称列表
export function getChannelSources(activityId: any,) {
    return request({
        url: 'tienchin/activity/channel/list',
        method: 'get',
    });
}

// 查询渠道名称列表
export function addactivity(data: any,) {
    return request({
        url: 'tienchin/activity',
        method: 'post',
        data,
    });
}

// 根据活动ID查询一个具体的活动
export function getlistactivity() {
    return request({
        url: '/tienchin/activity/{activityId}',
        method: 'get',
    });
}

// 根据活动ID查询一个具体的活动
export function editactivity(data: any,) {
    return request({
        url: '/tienchin/activity' ,
        method: 'put',
        data
    });
}